Prepare for Elixir 1.19#137
Merged
Merged
Conversation
`+` is now [the preferred separator](https://hexdocs.pm/mix/1.18.3/Mix.Tasks.Do.html) for `mix do` and has been supported since Elixir 1.14. Given that it has better support on Windows than the older `,`, we'll officially drop support for Elixir 1.13 and earlier and use the `+` separator.
39758f0 to
bb36f9f
Compare
Allow passing in overrides to `Config.new` and merge them into the default `ansi_enabled?` flag. We now no longer rely on manually creating Config structs in the tests.
This prepares for Elixir 1.19/OTP 28 dropping support for compile-time regexes. Co-authored-by: Frank Dugan III <frank3@duganator.com>
OTP 28 changes the internal structure of regexes so that they are no longer directly comparable. We add some undocumented helper functions to `Config` for doing the necessary comparisons and then use them.
Includes OTP 28 compatibility.
Runs v1.19/OTP 28 locally and in CI. Also updates the `main` build to use OTP 28.
It includes some new rules to automatically fix some Elixir 1.19 deprecations.
7134f6c to
9db3ad2
Compare
Set fail-fast to false to allow all versions to run to completion in order to get full feedback on a change. Also, mark the `main` build as `experimental` because it may fail from time to time.
ExUnit in Elixir 1.20 deprecates `ExUnit.Filters.parse_path/1` in favor of `ExUnit.Filters.parse_paths/1`. However, the newer function is only available in Elixir 1.16 and newer and we (and Elixir) still support 1.14 and 1.15. To address this, we conditionally use the newer function in 1.20 and above (including pre-releases) and the older function otherwise.
randycoulman
added a commit
that referenced
this pull request
Jun 10, 2025
There are a number of deprecations in 1.19 that we need to handle: - the separator character for `mix do` changes from `,` to `+` - regexes can no longer be used in compile-time contexts (module attributes and struct defaults) - regexes can no longer be compared directly with each other; they need to be compared on their `Regex.source` instead There's also a forthcoming deprecation in 1.20 that we need to work around: - `ExUnit.Filters.parse_path/1` is being deprecated in favor of `ExUnit.Filters.parse_paths/1`. The newer function is only available in Elixir 1.16 and newer and we (and Elixir) still support 1.14 and 1.15, so we conditionally use the new function in Elixir 1.20 and above. Closes #138 Co-authored-by: Frank Dugan III <frank3@duganator.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a number of deprecations in 1.19 that we need to handle:
mix dochanges from,to+Regex.sourceinsteadThere's also a forthcoming deprecation in 1.20 that we need to work around:
ExUnit.Filters.parse_path/1is being deprecated in favor ofExUnit.Filters.parse_paths/1. The newer function is only available in Elixir 1.16 and newer and we (and Elixir) still support 1.14 and 1.15, so we conditionally use the new function in Elixir 1.20 and above.